home *** CD-ROM | disk | FTP | other *** search
/ Leonardo the Inventor / Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso / LEOWINMV / DATABASE.DIR / 00098_Script_CLEARING HANDLERS < prev    next >
Text File  |  1996-03-28  |  2KB  |  57 lines

  1. -- --------------------------------------------------------
  2. -- Handler clearDatabase resets the database from the 
  3. -- previous topic.
  4.  
  5. on clearDatabase
  6.   global textSprite, clearedFlag, printbutton, searchButton
  7.   
  8.   if not(clearedFlag) then
  9.     set the editableText of sprite textSprite = FALSE
  10.     set the castNum of sprite textSprite = the number of cast "Empty Text"
  11.     
  12.     clearTitle
  13.     unhiliteClickedTopic
  14.     removeMoreButtons
  15.     
  16.     resetCurrentPage
  17.     resetCurrentPicture
  18.     resetCurrentCaption
  19.     
  20.     removeTopicPicture
  21.     
  22.     disableTopicButtons
  23.     updateStage
  24.     
  25.     setClearedFlag(TRUE)
  26.   end if
  27. end
  28.  
  29. -- --------------------------------------------------------
  30. -- Handler setClearedFlag sets the variable clearedFlag
  31. -- which indicates whether or not the text has already
  32. -- been cleared.
  33.  
  34. on setClearedFlag val
  35.   global clearedFlag
  36.   
  37.   set clearedFlag = val
  38. end
  39.  
  40. -- --------------------------------------------------------
  41. -- Handler clearSearchTopicField clears the field "searchTopic"
  42. -- which contains the user input word to be searched for.
  43.  
  44. on clearSearchTopicField
  45.   put " " into field "searchTopic"
  46.   setFieldFont("searchTopic")
  47.   set the textSize of field "searchTopic" = 14
  48.   set the textHeight of field "searchTopic" = 16
  49.   put "" into field "searchTopic"
  50. end
  51.  
  52. -- ---------------------------------------------------------------
  53. -- Handler clearTitle clears the title field.
  54.  
  55. on clearTitle
  56.   put " " into cast "Topic Title"
  57. end